<?php
include(dirname(__FILE__)."/inc/taobaoCom.php");
$iid = filter_input(INPUT_GET,'iid');
$nick = filter_input(INPUT_GET,'nick');
if (!$iid)
{
	header("Location:/");
}else
{
	$class = new taobaoCom();
	$itemTaokeInfo = $class->getTaokeProductInfo($iid);
	if ($itemTaokeInfo[0]['click_url'])
	{
		header("Location:".$itemTaokeInfo[0]['click_url']);
	}else
	{
		$itemInfo = $class->getItemInfo($iid,$nick);
		header("Location:".$itemInfo['detail_url']);
	}
}